import axios from 'axios';

export function searchWorkType (param) {
	return axios({
      method : 'post',
      url : '/contacttype/queryContactType',
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
}

export function addWorkType (param) {
	return axios({
      method : 'post',
      url : '/contacttype/addContactType',
      data: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
}

export function deleteWorkType (param) {
	return axios({
      method : 'post',
      url : '/contacttype/deleteContactType',
      data: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
}

export function editWorkType (param) {
	return axios({
      method : 'post',
      url : '/contacttype/updateContactType',
      data: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
}
//获取质量标准首页数据 及跳转分页页面渲染 search数据
export function getWorkQualityDateUrl(param) {
    return axios({
        method : 'get',
        url : '/workquality/search',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

//质量列表删除
export function getWorkQualityDeleteDateUrl (param) {
    return axios({
        method : 'post',
        url : '/workquality/delete',
        data: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

//新增页面add
export function getWorkQualityBulidDateUrl(param) {
    return axios({
        method : "post",
        url : "/workquality/add",
        data: param,
        headers: {
            "Cache-Control": "no-cache",
            "content-type":"application/json"
        }
    })
}
//编辑页面 新建页面渲染 质量列表
export function getWorkKeyDataUrl(param) {
    return axios({
        method : 'post',
        url : '/workquality/load',
        data: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}
//编辑页面 修改
export function getWorkEditDateUrl(param) {
    return axios({
        method : 'post',
        url : '/workquality/finish',
        data: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}
export function searchWorkProList(param) {
    return axios({
        method : 'get',
        url : '/procedure/list',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function toggleCheckItemStatus(param) {
    let url = param.enableStatus ? '/workquality/detail/disable' : '/workquality/detail/enable'
    return axios({
      method: 'post',
      url,
      data: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
  }
export function queryPicturesName(param) {
    return axios({
      method: 'get',
      url:'/workquality/getPicsOfItem',
      params: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
  }